#include<stdio.h>
int main()
{
    int x,y;
    printf("请输入x:");
    scanf("%d",&x);
    if(x<0)
    y=x+20;
    else if(x<10)
    y=x*x;
    else
    y=3*x-3;
    printf("%d",y);
    return 0;
}